<template>
  <div class="total" v-show="totalShow">当前功德总数：{{ props.totalClick }}</div>
</template>

<script setup lang="ts">
const props = defineProps({
	// 点击总数
	totalClick: {
		type:Number,
		default:  0
	}
})
// 是否展示总点击数
const totalShow:Ref<boolean> = ref(true)
const { proxy }:any = getCurrentInstance()
proxy.$eventChannel.on('showTotal', (isShowTotal:boolean) => {
    totalShow.value = isShowTotal
})
</script>


<style lang="scss" scoped>
.total{
    position: absolute;
    top:165px;
    width:100px;
    height:100px;
    color: #fff;
    font-size: 12px;
    padding-left: 10px;
}
</style>